<%-- 
    Document   : cambiarFecha
    Created on : 28-dic-2011, 4:07:25
    Author     : Bruno
--%>
<%@taglib  prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>Cambiar fecha del sistema</title>
    </head>
    <body>
        <div id="bodydiv">
            <form action="cambiarFecha?var=nuevaFecha" method="post" id="form">
                <span style="color: #0395CC; margin-top: 20px; font-size: 20pt; font-family: Arial;"><b>Cambiar fecha</b></span>
                <hr />
                <br />
                <br />
                <table>
                    <tr>
                        <td>Nueva fecha</td>
                        <td><input type="text" id="fechaNueva" name="fechaNueva" class="required dateFormat"/>&nbsp;
                        <input type="text" id="hora" name="hora" maxlength="2" style="width: 35px" class="required number"/>:
                        <input type="text" id="minutos" name="minutos" maxlength="2" style="width: 35px" class="required number"/></td>
                        <td>&nbsp;</td>
                        <td><input type="submit" value="Cambiar" /></td>
                    </tr>
                </table>
            </form>
                <br />
                <br />
                <table>
                    <tr>
                        <td><input type="button" id="restablecer" value="Restablecer fecha" /></td>
                    </tr>
                </table>
            <c:if test="${not empty requestScope.message}" >
                <font color="green">${requestScope.message}</font>
                <c:remove scope="request" var="message" /> 
            </c:if>
        </div>
        <jsp:include page="index.jsp" />
        <script type="text/javascript">
            $("#fechaNueva").datepicker({ dateFormat: 'dd/mm/yy' });
            
            $("#form").validate();
            
            //Envia parametro al servlet para que restablezca la fecha
            $("#restablecer").click(function(){
                location.href = "cambiarFecha?var=restablecer";
            });
        </script>
    </body>
</html>
